Page({
  data: {
    subscriptions: [
      { id: 1, name: '科技', checked: true },
      { id: 2, name: '娱乐', checked: false },
      { id: 3, name: '体育', checked: true },
      // 更多订阅项目
    ]
  },

  toggleSubscription(e) {
    const subscriptionId = e.currentTarget.dataset.id;
    const subscriptions = this.data.subscriptions;
    const index = subscriptions.findIndex(sub => sub.id === subscriptionId);
    if (index !== -1) {
      subscriptions[index].checked = !subscriptions[index].checked;
      this.setData({ subscriptions });
    }
  }
});
